/**
 * This file is part of ossecdb-extjs.
 *
 * Copyright (C) 2011 Brendan Johnston
 *
 * Contact: brendan@johnston.net.au
 *
 * Project: http://code.google.com/p/ossecdb-extjs/
 *
 * License: http://www.gnu.org/licenses/gpl-3.0.html
 */

Ext.define('OssecWeb.store.Alerts', {
	extend: 'Ext.data.Store',

	model: 'OssecWeb.model.Alert',
	
	autoLoad: true,
	autoDestroy: true,
	proxy: {
		type: 'ajax',
		url: 'json-alertgrid.php',
		reader: {
			type: 'json',
			root: 'data',
			idProperty: 'alert_id',
			totalProperty: 'total'
		}
	},
	pageSize: 30,
	remoteSort: true,
	sortInfo: {
		field: 'alert_id', direction: 'DESC'
	}
});